-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: less confusing permit2 flow #8508
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
* feat: actually make permit2 allowance/sign distinct steps * feat: stylistic
woodenfurniture
approved these changes
Jan 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One Q but LGTM
src/components/MultiHopTrade/components/TradeConfirm/helpers.ts
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This makes things less confusing for users and eng. alike, by clearly separating Permit2 contract allowance step and the actual Permit2 EIP-712 signing.
In effect:
Note, new copies are not yet approved by @shapeshift/product.
Issue (if applicable)
Risk
Low, though for paranoia's sake, test this both with the old and new swapper flow and ensure things look good, see testing below.
Testing
Engineering
Test the three ecases below with both old and new swapper flow.
0x trade - No Permit2 allowance granted for asset
0x trade - Infinite Permit2 allowance already granted for asset
Non-0x-trade
Operations
Follow the same steps as eng, but only with the old swapper flow (the one you can see in prodish envs e.g release).
New swapper flow is still under flag and doesn't require ops testing.
Screenshots (if applicable)
New trade flow
https://jam.dev/c/e250753f-03fb-401c-b354-26c7736aa382
https://jam.dev/c/79ac916c-23be-44aa-b36a-af6fe5035571
https://jam.dev/c/d77ec8f2-11a6-4582-bcc9-6a28a32d4fe9
Old trade flow
https://jam.dev/c/2cda5f82-4055-4665-afe0-a390ea87e9af
https://jam.dev/c/bc78efca-1b02-4873-a0be-c08c8ec74dd9
https://jam.dev/c/9afe5f79-1295-46e5-9117-3450b67f3dc2